class BSAVOCHeader:
    
    # 19 chars + 1 byte + 3 * 2 WORD's
    
    CREATIVE_VOICE_SIZE = 19
    MARK_EOF_SIZE = 1
    DATA_OFFSET_SIZE = 2
    VERSION_SIZE = 2
    TWO_COMPS_VERSION_SIZE = 2
    SIZE = self.CREATIVE_VOICE_SIZE + self.MARK_EOF_SIZE +\
            self.DATA_OFFSET_SIZE + self.VERSION_SIZE + self.TWO_COMPS_VERSION_SIZE
            
    def __init__(self, creative_voice = [], mark_eof = None, data_offset = 0,
                 version = 0, twos_comp_version = 0):
        self._creative_voice = creative_voice
        self._mark_eof = mark_eof
        self._data_offset = data_offset
        self._version = version
        self._two_comps_version = twos_comp_version
        
    def __repr__(self):
        return 'BSAVOCHeader: [creative_voice=' + str(self._creative_voice) +\
            '|mark_eof=' + self._mark_eof + '|data_offset=' + self._data_offset +\
            '|version=' + self._version + ']'
            
    # getters
    def get_creative_voice(self):
        return self._creative_voice
    
    def get_mark_eof(self):
        return self._mark_eof
    
    def get_data_offset(self):
        return self._data_offset
    
    def get_version(self):
        return self._version
    
    def get_twos_comp_version(self):
        return self._two_comps_version
    
    # setters
    def set_creative_voice(self, creative_voice):
        self._creative_voice = creative_voice
        
    def set_mark_eof(self, mark_eof):
        self._mark_eof = mark_eof
        
    def set_data_offset(self, data_offset):
        self._data_offset = data_offset
        
    def set_version(self, version):
        self._version = version
        
    def set_twos_comp_version(self, twos_comp_version):
        self._two_comps_version = twos_comp_version
        
    def load(self, global_bsa_data):
        self._creative_voice = global_bsa_data.read(self.CREATIVE_VOICE_SIZE)
        
        self._mark_eof = global_bsa_data.read(self.MARK_EOF_SIZE)
        
        self._data_offset = global_bsa_data.read(self.DATA_OFFSET_SIZE)
        
        self._version = global_bsa_data.read(self.VERSION_SIZE)
        
        self._two_comps_version = global_bsa.read(self.TWO_COMPS_VERSION_SIZE)